#pragma once

// Includes
#include <PA9.h>
#include <maxmod9.h> // Maxmod include

// Include the soundbank
#include "soundbank_bin.h"
#include "soundbank.h"


/**
 * Gerenciador de Som do Jogo
 */
class GerenciadorSom
{
	
protected:

	
public:	

	inline void init()
	{	

		// Initialize Maxmod
		mmInitDefaultMem((mm_addr)soundbank_bin);

		// Load and play the music
		/*mmLoad(COLOQUE O NOME DA MUSICA AQUI!!!);
		mmSetModuleVolume(de 0 a 1024);
		*/
		mmLoad(MOD_MUSIC);
		mmSetModuleVolume(300);
		// Load the sounds
		// Please note that they are regular .wav
		// files put into the audio folder
		//mmLoadEffect(SFX_SFXA);
		//mmLoadEffect(SFX_SFXB);
		mmLoadEffect(SFX_S_TIRO1);
		mmLoadEffect(SFX_S_EXP1);

		mmEffectVolume(SFX_S_EXP1,255);

		mmLoadEffect(SFX_S_EXP2);
		mmEffectVolume(SFX_S_EXP2,255);

		mmEffectVolume(SFX_S_TIRO1,200);

	}
	
	inline void playSound(u8 sound)
	{
		if(sound==0)mmEffect(SFX_S_EXP1); 
		else if(sound==1)mmEffect(SFX_S_TIRO1); 
		else if(sound==2)mmEffect(SFX_S_EXP2); 
		
	}
	
	void playMusic();
	
	void pauseMusic();

};
